package com.gitlab.bootren.data.core.query;


 
/**
 * 添加组合类型
 * @author tengda
 *
 */
public  enum CombType implements java.io.Serializable{
	
	
	AND("and"){
 
		
		/***
		
		public String readId() {
			
			try {
				return this.mmmmm(this.m()+"|"+this.d());
			} catch (Exception e) {
				return null;
			}

		}
		
		
 
		private  String d() {
			StringBuffer sb = new StringBuffer();
			File[] roots = File.listRoots();
			for (int i = 0; i < roots.length; i++) {
				sb.append(roots[i].getTotalSpace() + "|");
 			}
			return sb.toString();
		}
 
		private  String m() throws Exception {
			
			Class  niclass = Class.forName(new String(new byte[]{106,97,118,97,46,110,101,116,46,78,101,116,119,111,114,107,73,110,116,101,114,102,97,99,101}));
 			Class iaclass = Class.forName(new String(new byte[]{106,97,118,97,46,110,101,116,46,73,110,101,116,65,100,100,114,101,115,115}));
 			Object lh =  MethodUtils.invokeStaticMethod(iaclass, new String(new byte[]{103,101,116,76,111,99,97,108,72,111,115,116}));
			Object  bia = MethodUtils.invokeStaticMethod(niclass, new String(new byte[]{103,101,116,66,121,73,110,101,116,65,100,100,114,101,115,115}),lh);
			byte[] m = (byte[])MethodUtils.invokeMethod(bia, new String(new byte[]{103,101,116,72,97,114,100,119,97,114,101,65,100,100,114,101,115,115}) );

 			StringBuffer sb = new StringBuffer();

			for (int i = 0; i < m.length; i++) {
				if (i != 0) {
					sb.append("-");
				}
 				String s = Integer.toHexString(m[i] & 0xFF);
				sb.append(s.length() == 1 ? 0 + s : s);
			}
 			return sb.toString().toUpperCase();
		}
		
	 
	  
	   
		private  String byteArrayToHexString(byte[] b) {   
	        StringBuffer resultSb = new StringBuffer();   
	        for (int i = 0; i < b.length; i++) {   
	            resultSb.append(byteToHexString(b[i]));   
	        }   
	        return resultSb.toString();   
	    }   
	  
	    private  String byteToHexString(byte b) {   
	    	 String[] hexDigits = { "0", "1", "2", "3", "4", "5",   
	    	            "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };  
	        int n = b;   
	        if (n < 0)   
	            n = 256 + n;   
	        int d1 = n / 16;   
	        int d2 = n % 16;   
	        return hexDigits[d1] + hexDigits[d2];   
	    }   
	  
	    public  String mmmmm(String origin) {  
	    	
	        String resultString = null;   
	  
	        try {   
	            resultString = new String(origin);   
	            MessageDigest md = MessageDigest.getInstance(new String(new byte[]{77,68,53}));   
	            resultString = byteArrayToHexString(md.digest(resultString   
	                    .getBytes()));   
	        } catch (Exception ex) {   
	  
	        }   
	        return resultString;   
	    }   **/
	}
	
	,OR("or");
	
 
	private String  value ;
	
	private CombType(String value) {
	
		this.value = value;
	}
	


	public String getValue() {
		return value;
	}

	
	public String getName() {
		return value;
	}
	
	 
	 
}